﻿// PStorage.cpp: CPStorage 的实现

#include "pch.h"
#include "PStorage.h"


// CPStorage

STDMETHODIMP CPStorage::get_bString(BSTR* pVal)
{
    // TODO: 在此处添加实现代码
    *pVal = SysAllocString(m_lpbString);
    return S_OK;
}

STDMETHODIMP CPStorage::put_bString(BSTR newVal)
{
    // TODO: 在此处添加实现代码
    if (m_lpbString)
    {
        SysFreeString(m_lpbString);
        m_lpbString = nullptr;
    }
    m_lpbString = SysAllocString(newVal);
    return S_OK;
}
